לוגיקה סינכרונית. מרצה: יפתח גילעדי, פלאפון: מיל:

Size: px
Start display at page:

Download "לוגיקה סינכרונית. מרצה: יפתח גילעדי, פלאפון: מיל:"

Transcription

1 לוגיקה סינכרונית מרצה: יפתח גילעדי, פלאפון: מיל:

2 לוגיקה סינכרוני ת סינכרונית לפי דופקי השעון, התהליך רץ. כל פ ו לס של ה ש ע ו ן היחידה הבסיסית ביותר בלוגיקה הסינכרונית הם ללא ספק הפליפ פלופים.(F.F) אז כ יצ ד נת אר,F.F ב.VHDL נזכ יר ק ו ד ם מנק ו דת מ בט של ח ו מ רה כ יצ ד נראה ופ ו ע ל ה F.F הפש וט ב י ו תר.D-type F.F

3 D type F.F מסומן בחומרה באופן הבא: ניתן להבחין כי לרכיב 5 פורטים, כניסת שעון.Reset ו Set כניסת, Clk רגל כניסה D,רגל יציאה, Q נתעלם כרגע מרגלי ה,Preset פעולת הרכיב היא כדלקמן: ברגע שמגיעה עליית שעון ברגל ה clk היציאה Q מתעדכנת בערך חדש על פי הערך המצוי ב D.

4 D type F.F library ieee; use ieee.std_logic_1164.all; ENTITY dff_logic IS PORT ( d,clk : in std_logic; q : out std_logic); END dff_logic; להל ן ת י א ור המ עגל ב :VHDL ARCHITECTURE beh OF dff_logic IS BEGIN process(clk) begin if Clk'Event and Clk = '1' then q <= d; end if; end process; END beh;

5 הבדלים בין Dff ל D latch מהו ההבדל בין ה Dff ל D? latch Latch D נראה באופן הבא: בדלגלג מסוג נועל הפעילות מתבצעת לפי רמה לוגית ולא לפי דרבון קצה. כלומר Q מתעדכן ב ערך של D כל עוד הרמה הלוגית של ENA היא 1 (או 0 אם הוא פעיל בנמוך). לכן ניתן להגיד כי הנועל שקוף ברמה הפעילה ומעביר כל שינוי בכניסה לשינוי ביציאה מידית אך נעול או חוסם שינוים בכניסה עבור הרמה הלא פעילה.

6 D latch בשפת תיאור ח ומרה library ieee; use ieee.std_logic_1164.all; ENTITY dlatch_logic IS PORT ( d,ena : in std_logic; q : out std_logic); END dlatch_logic; להלן הקוד שיצור דלגלג נועל מסוג D: ARCHITECTURE beh OF dlatch_logic IS BEGIN process(ena,d) begin if (ENA = '1 ) then q <= d; end if; end process; END beh;

7 דלגלגים נוספים כיצד אם כן נתאר דלגלג מסוג T? נזכיר כי דלגלג מסוג T יראה באופן הבא: דלגלג מס וג T גורם ל ה יפ וך מצב של המ ו צא כל על י י ת ש ע ו ן כל ע ו ד T נמצא ברמה הפ ע י לה, אם T ברמה ה לא פע יל ה אז ה וא ש ו מר את מצב ה מ וצ א כפ י שה י ה.

8 Tff בשפת תיאו ר חומרה library ieee; use ieee.std_logic_1164.all; ENTITY tff_logic IS PORT ( T,Clk : in std_logic; q : out std_logic); END tff_logic; להלן הקוד שיצור דלגלג T: type ARCHITECTURE beh OF tff_logic IS BEGIN process(clk) begin if Clk Event and Clk = '1 then if (T = 1 ) q <= not(q); end if; end process; END beh;

9 תיאור ש ל רגיסטר בשפת תיאור חומרה ENTITY Reg_logic IS PORT ( d : in std_logic_vector(7 downto 0); Clk : in std_logic; q : out std_logic_vector(7 downto 0)); END Reg_logic; ARCHITECTURE beh OF Reg_logic IS BEGIN process(clk) begin if Clk'Event and Clk = '1' then q <= d; end if; end process; END beh; זכר ו כ י רגי סטר ה וא ל מ עש ה אסו פה ש ל דלגלג ים מס וג -D type F.F ולכ ן

10 Preset סינכרוני ואסינכ רוני כפי שראינו מלבד q,d,clk ו ENA נהוג לתת לדלגלגים גם אותו Preset אותות המאלצים ערך מסויים במוצא ללא תלות במצב הכניסה או השעון. לדוגמא אם ערך ה RESET יהיה פעיל המוצא יהיה 0 ללא תלות בכניסה או בשעון ורק לאחר שחרור ה Reset הרכיב יתחיל לעבוד. ה הבדל בין אות סינכרוני לאות אסינכרוני ברור ומובהק היטב, אות סינכרוני הוא אות שמגיע או פועל בתלות(בסינכרון) אם אות אחר לרוב אות שעון. לעומת זאת אות אסינכרוני פועל באופן עצמאי וללא תלות בשעון או סיגנל אחר

11 Preset סינכרוני ואסינכ רוני כיצד יראה הקוד עבור Reset ו אסינכרונים? Set סינ כר ונ י י ם ו process(clk,clr,d,set) begin If Clr = 1 then q <= 0 ; elsif Set = 0 then q <= 1 ; q <= d; end if; end process; elsif Clk Event and Clk = '1 then אותותאסינכרוניםאינםתלוייםבשעון

12 Preset סינכרוני ואסינכ רוני process(clk,clr,d,set) begin If Clk Event and Clk = '1 then if Clr = 1 then q <= 0 ; elsif Set = 0 then q <= 1 ; else q <= d; end if; end process; כעת Reset ו Set סינ כרו נ י י ם: כעת הא ו תו ת לו יי ם בעליי ת שע ון ו ל כן הם סינכרונ ים

13 מימוש ר כיבים ס י נכרוניים כ יצ ד נמ מש מו נה? מונה הוא למעשה רגיסטר מיוחד בעל X ביטים המסוגל לעלות את ערכו באחד עם כל עליית שעון, בנוסף יש לו רגל reset שמאפסת אותו ורגל Set שמאלצת ערך מסויים ולעתיים רבות יש לו גם רגל כניסה מיוחדת המאפשרת הכנסת ערך מבחוץ למונה.

14 מימוש מונה 4 ביט עם טעינה מקבילית המונה הנ"ל הוא בגול 4 ביט ויש לו רגלים לאיתחול ולקביעת ערך אסינכרוניות רגל לטעינת ערך סינכרונית ועבור כל עליית שעון המונה מקדם את עצמו באחד.

15 תיאור ה מונה בשפת (#1)VHDL library ieee; use ieee.std_logic_1164.all; Use work.std_arith.all; ENTITY counter IS PORT ( d : in std_logic_vector(3 downto 0); Clk,Reset_n,Set_n,Load_n : in std_logic; q : buffer std_logic_vector(3 downto 0)); END counter; מבנ ה ה Entity (המ מ שק)

16 תיאור ה מונה בשפת (#2)VHDL ARCHITECTURE beh OF counter IS BEGIN process(clk,reset_n,set_n,d,load_n) begin if (Reset_n = 0 ) then q <= (others => 0 ); elsif(set_n = 0 ) then q <= (1,0,1, others = > 1 ); elsif Rising_edge(Clk) then if (Load_n = 0 ) then q <= d; Else q <= q + 1 ; end if; end process; END beh;

17 מימוש מונה 4 ביט עם טעינה מקבילית( 2# ) אפשר לש ד רג את המו נה שבנ י נ ו בד וגמ א הנ"ל ע"י ש ימ ו ש ברגל ים ד ו-כ י ו ונ י ו ת שגם י חז י ק ו את ערך המ ו נה וגם י שמ ש ו ככנ י סה ל ע רך חדש. הרכ יב ה ח ד ש ירא ה כך

18 תיאור ה מונה החדש בש פת (#1)VHDL library ieee; use ieee.std_logic_1164.all; Use work.std_arith.all; ENTITY counter_b IS PORT ( Clk,Reset_n,Set_n,Load_n,Oe : in std_logic; q : inout std_logic_vector(3 downto 0)); END counter_b; מבנ ה ה Entity (המ מ שק)

19 תיאור ה מונה החדש בש פת (#2)VHDL ARCHITECTURE beh OF counter_b IS Signal cnt : std_logic_vector; BEGIN process(clk,reset_n,set_n,d,load_n) begin if (Reset_n = 0 ) then q <= (others => 0 ); elsif(set_n = 0 ) then q <= (1,0,1, others = > 1 ); elsif Rising_edge(Clk) then if (Load_n = 0 ) then cnt <= q; Else cnt <= cnt + 1 ; end if; end process; q <= (others => Z ) when Oe = 0 else cnt; END beh;

20 מקורות נוספים 1. VHDL / Douglas Perry 2. VHDL For Programmable Logic / Kevin Skahill 3. Evita VHDL interactive Tutorial 4.

Algorithms. Intro2CS week 5

Algorithms. Intro2CS week 5 Algorithms Intro2CS week 5 1 Computational problems A computational problem specifies an inputoutput relationship What does the input look like? What should the output be for each input? Example: Input:

More information

Chapter 19a Pronominal Suffixes Introduction

Chapter 19a Pronominal Suffixes Introduction Chapter 19a Pronominal Suffixes Introduction You already know that when a pronoun is the direct object of a verb, it is commonly attached to the definite direct object marker א ת.נוּ).(י שׁ מ ר There is,

More information

עידן ה- Web 3.0. ל- Web Semantic ו- Web 3.0. Info April 2008

עידן ה- Web 3.0. ל- Web Semantic ו- Web 3.0. Info April 2008 המעבר מט קסונו מיה ל אונ תו לו גיה וההבט חה של עידן ה- Web 3.0 ד"ר אורי חנני 1 April 2008 Info 2008 תו כ ן ה הרצאה 1.רקע לתחום ומושגי יס ו ד ד ר ך טקס ונ ומי ה ל אנתו לו ג י ה - מאינד ק ס, 2.עקרונו ת ומבנה

More information

רשימות דילוגים Skip Lists

רשימות דילוגים Skip Lists Lecture6 of Geiger & Itai s slide brochure www.cs.technion.ac.il/~dang/courseds רשימות דילוגים Skip Lists Skip lists: A probabilistic Alternative to Balanced Trees, William Pugh, Communications of the

More information

The Makor System for Typesetting Hebrew

The Makor System for Typesetting Hebrew Department of Mathematics, John Jay College, City University of New York ahoenig@suffolk.lib.ny.us Introduction I d like to describe this morning a new TEX-based system for typesetting Hebrew. I call this

More information

Lecture 16: Linked Lists

Lecture 16: Linked Lists Extended Introduction to Computer Science CS1001.py Lecture 16: Linked Lists Instructors: Benny Chor, Amir Rubinstein Teaching Assistants: Michal Kleinbort, Amir Gilad School of Computer Science Tel-Aviv

More information

הקלחמ ה תמרב ת ונ וכ ת (static members ) יליזרב דהוא Java תפשב ם דקת מ תונכת ביבא ל ת תטיסרבינוא

הקלחמ ה תמרב ת ונ וכ ת (static members ) יליזרב דהוא Java תפשב ם דקת מ תונכת ביבא ל ת תטיסרבינוא ת כו נו ת ברמת ה מחלקה (static members) אוהד ברזילי תכנות מ תקד ם בשפת Java אוניברסיטת ת ל אביב static keyword שדות המוגדרים כ static מציינים כי הם מוגדרים ברמת המחלקה ולא ברמת עצם כל העצמים של אותה מחלקה

More information

היצביט ומ - ןוכית ת וי נבת

היצביט ומ - ןוכית ת וי נבת תבני ו ת תיכון Patterns) (Design תבנ יו ת תיכון - מו טיבציה בחיי היום יום אנחנו מתארים דברים תוך שימוש בתבניות חוזרות: "מכונית א' היא כמו מכונית ב', אבל יש לה 2 דלתות במקום 4" "אני רוצה ארון כמו זה, אבל

More information

COMM1003. Information Theory. Dr. Wassim Alexan Spring Lecture 4

COMM1003. Information Theory. Dr. Wassim Alexan Spring Lecture 4 COMM1003 Information Theory Dr. Wassim Alexan Spring 2018 Lecture 4 Cryptology Cryptology is the most general term and it splits into two parts: Cryptography and Cryptanalysis Cryptography is the science

More information

May 2007 Info 2007

May 2007 Info 2007 חיפוש ויז ואלי מ בוסס אונ תו לו גיה ד"ר אורי חנני uri2@netvision.net.il May 2007 1 Info 2007 1.מושגי יסוד ורקע תו כ ן ה הרצאה מהי אנתול וגיה 2.ס בי בת הע בוד ה של החיפוש הויז ואלי 3.המחשו ת 4.אירו ע ים

More information

תוכנה 1 סמסטר א' תשע"א

תוכנה 1 סמסטר א' תשעא General Tips on Programming תוכנה 1 סמסטר א' תשע"א תרגול מס' 6 מנשקים, דיאגרמות וביטים * רובי בוים ומתי שמרת Write your code modularly top-down approach Compile + test functionality on the fly Start with

More information

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics of Cryptography

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security. Chapter 2 Basics of Cryptography Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle Network Security Chapter 2 Basics of Cryptography Overview of Cryptographic Algorithms Attacking Cryptographic

More information

ASP.Net Web API.

ASP.Net Web API. ASP.Net Web API 1 מה זה? Web API View בלבד ולא Data אותו מממש השרת והוא מחזיר לקליינט API הוא Web API הבקשה והתשובה הן בפרוטוקול Http\Https הקליינטים של Web API יכולים להיות רבים : אפשר להשתמש גם בMVC

More information

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

Communication Networks ( ) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner Communication Networks (0368-3030) / Spring 2011 The Blavatnik School of Computer Science, Tel-Aviv University Allon Wagner Kurose & Ross, Chapter 3.5.5, 3.7 (5 th ed.) Many slides adapted from: J. Kurose

More information

Programming for Engineers in Python

Programming for Engineers in Python Programming for Engineers in Python Lecture 9: Sorting, Searching and Time Complexity Analysis Autumn 2011-12 1 Lecture 8: Highlights Design a recursive algorithm by 1. Solving big instances using the

More information

Programming for Engineers in Python

Programming for Engineers in Python Programming for Engineers in Python Lecture 9: Sorting, Searching and Time Complexity Analysis Autumn 2011-12 1 Lecture 8: Highlights Design a recursive algorithm by 1. Solving big instances using the

More information

Graph Database, think different!

Graph Database, think different! Graph Database, think different! Written by Roni Licher Winter 2014-2015 236363 - Database Systems - Technion Nodes Edges (directed or not) Properties Neo4j and Cypher 4j Graph database (Like SQL server

More information

Practical Session - Heap

Practical Session - Heap Practical Session - Heap Heap Heap Maximum-Heap Minimum-Heap Heap-Array A binary heap can be considered as a complete binary tree, (the last level is full from the left to a certain point). For each node

More information

Side Heads. CS3/ CS4/CS5 InDesign Plug-in

Side Heads. CS3/ CS4/CS5 InDesign Plug-in Side Heads CS3/ CS4/CS5 InDesign Plug-in version 1.0.7 last revision: January 7, 2011 S i d e H e a d s Contents 3 Introduction 8 Installation Macintosh Install Windows Install 10 Purchasing Licenses and

More information

Sequential Logic - Module 5

Sequential Logic - Module 5 Sequential Logic Module 5 Jim Duckworth, WPI 1 Latches and Flip-Flops Implemented by using signals in IF statements that are not completely specified Necessary latches or registers are inferred by the

More information

לתיכנות עם MATLAB Lecture 5: Boolean logic and Boolean expressions

לתיכנות עם MATLAB Lecture 5: Boolean logic and Boolean expressions מבוא לתיכנות עם MATLAB 23427 Lecture 5: Boolean logic and Boolean expressions Written by Prof. Reuven Bar-Yehuda, Technion 203 Based on slides of Dr. Eran Eden, Weizmann 2008 ביטויים לוגיים דוגמא: תקינות

More information

פסיקות מערכות ובקרים. Components of a simple PC. I/O Device Types Block Devices. Typical Data Rates מהירות טיפוסית נתונים

פסיקות מערכות ובקרים. Components of a simple PC. I/O Device Types Block Devices. Typical Data Rates מהירות טיפוסית נתונים מנהל התקנים DMA Introduction to Systems Programming מבוא לתכנות מערכות Device Manager גישה יש ירה לז י כר ו ן פסיקות קלט פלט Input-Output Devices, s, and I/O Architectures ניהול ציוד ה יקפי INTERRUPTS

More information

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle Network Security Chapter 2 Basics 2.1 Symmetric Cryptography Overview of Cryptographic Algorithms Attacking

More information

מבוא למדעי המחשב הרצאה 12:

מבוא למדעי המחשב הרצאה 12: מבוא למדעי המחשב הרצאה 12: קבצים וחריגות (Exceptions) 1 ז יכרון משני ל עומת ז יכרון ר אשי מתקן לאכסון מידע במחשב דיסק קשיח, DVD,CD,Disk on Key וכולי... איטי יותר מהזיכרון הראשי זול יותר מהזיכרון הראשי

More information

פיתוח מ ע רכות תוכנ ה מבוססו ת Java אוהד ברזילי

פיתוח מ ע רכות תוכנ ה מבוססו ת Java אוהד ברזילי פיתוח מ ע רכות תוכנ ה מבוססו ת הבטי תקשורת במערכות תוכנה על סדר היום תקש ורת בין מח שב ים תקש ורת ו חוטים מיקו מה ש ל התק שו רת ביישו ם ארכיטקטורות תק שו רת Client Server Peer to Peer RMI - תקשורת ללא

More information

לתיכנות עם MATLAB Lecture 5: Boolean logic and Boolean expressions

לתיכנות עם MATLAB Lecture 5: Boolean logic and Boolean expressions מבוא לתיכנות עם MATLAB 234127 Lecture 5: Boolean logic and Boolean expressions Written by Prof. Reuven Bar-Yehuda, Technion 2013 Based on slides of Dr. Eran Eden, Weizmann 2008 1 >>g = [89 91 80 98]; >>p

More information

VHDL And Synthesis Review

VHDL And Synthesis Review VHDL And Synthesis Review VHDL In Detail Things that we will look at: Port and Types Arithmetic Operators Design styles for Synthesis VHDL Ports Four Different Types of Ports in: signal values are read-only

More information

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems

Lecture 4: Modeling in VHDL (Continued ) EE 3610 Digital Systems EE 3610: Digital Systems 1 Lecture 4: Modeling in VHDL (Continued ) Sequential Statements Use Process process (sensitivity list) variable/constant declarations Sequential Statements end process; 2 Sequential

More information

In our case Dr. Johnson is setting the best practices

In our case Dr. Johnson is setting the best practices VHDL Best Practices Best Practices??? Best practices are often defined by company, toolset or device In our case Dr. Johnson is setting the best practices These rules are for Class/Lab purposes. Industry

More information

הוראות חיבור e-port בפרוטוקול Art-Net למערכות תאורה שונות

הוראות חיבור e-port בפרוטוקול Art-Net למערכות תאורה שונות 30.06.2014 הוראות חיבור e-port בפרוטוקול Art-Net למערכות תאורה שונות המסמך נכתב ונערך ע"י רונן בן-הרוש עבור חברת דנאור מערכות תיאטרון ואולפנים בע"מ. http://www.danor.com הבדיקות נעשו באולם רובינא, בתיאטרון

More information

כתבו קוד ב- 3 קבצי ה hpp (כתבו כהערה את שם הקובץ מעל) כך שהקוד יהיה תקין ובסגנון טוב. אין חובה

כתבו קוד ב- 3 קבצי ה hpp (כתבו כהערה את שם הקובץ מעל) כך שהקוד יהיה תקין ובסגנון טוב. אין חובה פקולטה: מדעי הטבע מחלקה: מדעי המחשב שם הקורס: מבנה זכרון ושפת ++C קוד הקורס: 7027810 תאריך בחינה: שאלות לדוגמא משך הבחינה: שעתיים שם המרצים: ד"ר אופיר פלא, ד"ר מירי בן ניסן חומר עזר: פתוח שימוש במחשבון:

More information

עקרונות שפות תכנות 2016 תרגול 8 Type Inference System. Substitution Interpreter.

עקרונות שפות תכנות 2016 תרגול 8 Type Inference System. Substitution Interpreter. עקרונות שפות תכנות 2016 תרגול 8 Type Inference System. Substitution Interpreter. Type Inference System The Type Inference System is a Scheme Implementation of the algorithm for Type Checking and Inference

More information

Engineering Programming A

Engineering Programming A Engineering Programming A תרגול 5 25.11.2012 מערכים חד-מימדיים )תזכורת( לדוגמא: מערך בשם Arr בגודל 8 שאיבריו מטיפוס int 3 7 5 6 8 1 23 16 0 1 2 3 4 5 6 7 ב - arr[0] ב יושב ערך שהוא המספר השלם 3 arr[1]

More information

Timing in synchronous systems

Timing in synchronous systems BO 1 esign of sequential logic Outline Timing in synchronous networks Synchronous processes in VHL VHL-code that introduces latches andf flip-flops Initialization of registers Mealy- and Moore machines

More information

Practical Session No. 14 Topological sort,amortized Analysis

Practical Session No. 14 Topological sort,amortized Analysis Practical Session No. 14 Topological sort,amortized Analysis Topological- Sort Topological sort Ordering of vertices in a directed acyclic graph (DAG) G=(V,E) such that if there is a path from v to u in

More information

VHDL: Code Structure. 1

VHDL: Code Structure. 1 VHDL: Code Structure talarico@gonzaga.edu 1 Mo:va:on for HDL- based design Standard Technology/vendor independent Portable and Reusable talarico@gonzaga.edu 2 Altera s Design Flow (RTL) RTL Generic Boolean

More information

Sequential Statement

Sequential Statement Sequential Statement Sequential Logic Output depends not only on current input values but also on previous input values. Are building blocks of; Counters Shift registers Memories Flip flops are basic sequential

More information

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1. Your name 2/13/2014 CSE 260 Introduction to Digital Logic and Computer Design Jonathan Turner Exam 1 Your name 2/13/2014 1. (10 points) Draw a logic diagram that implements the expression A(B+C)(C +D)(B+D ) directly (do not

More information

חומרה. Semester Topics. I/O Hardware up8086

חומרה. Semester Topics. I/O Hardware up8086 נושאים של סמסטר ב ב' Semester Topics Structure Operation Network חזרות - Review חומרה Hardware מיפוי קלט /פלט - Memory Mapped תכנות קלט /פלט Programmed פסיקות קלט /פלט Interrupt It s too much my circuits

More information

תוכנה 1 בשפת Java נושאים שונים בהורשה רובי בוים ומתי שמרת בית הספר למדעי המחשב אוניברסיטת תל אביב

תוכנה 1 בשפת Java נושאים שונים בהורשה רובי בוים ומתי שמרת בית הספר למדעי המחשב אוניברסיטת תל אביב תוכנה 1 בשפת Java נושאים שונים בהורשה רובי בוים ומתי שמרת בית הספר למדעי המחשב אוניברסיטת תל אביב Today Static vs. Dynamic binding Equals / hashcode String Immutability (maybe) 2 Static versus run-time

More information

<exp> ::= <define> <cexp> <define> ::= ( define <var-decl> <cexp> ) / DefExp(var:VarDecl, val:cexp)

<exp> ::= <define> <cexp> <define> ::= ( define <var-decl> <cexp> ) / DefExp(var:VarDecl, val:cexp) הנחיות כלליות: תאריך הבוחן: 10.5.2018 שם המרצה: מני אדלר,מיכאל אלחדד, ירון גונן מבחן בקורס: עקרונות שפות תכנות מס' קורס: 202-1-2051 מיועד לתלמידי: מדעי המחשב והנדסת תוכנה שנה: ב' סמסטר: ב' משך הבוחן: 2

More information

מצליחה. 1. int fork-bomb() 2. { 3. fork(); 4. fork() && fork() fork(); 5. fork(); printf("bla\n"); 8. return 0; 9. }

מצליחה. 1. int fork-bomb() 2. { 3. fork(); 4. fork() && fork() fork(); 5. fork(); printf(bla\n); 8. return 0; 9. } שאלה : (4 נקודות) א. ב. ג. (5 נקודות) הגדירו את המונח race-condition במדוייק לא להשמיט פרטים. ספקו דוגמא. (5 נקודות) מהו? Monitor נא לספק הגדרה מלאה. ( נקודות) ( נקודות) ציינו כמה תהליכים יווצרו בקוד הבא

More information

Amortized Analysis, Union-Find,

Amortized Analysis, Union-Find, Practical Session No. 13 Amortized Analysis, Union-Find, AMORTIZED ANALYSIS Refers to finding the average running time per operation, over a worst-case sequence of operations. Amortized analysis differs

More information

Tutorial 10. Introduction to C++ שימו

Tutorial 10. Introduction to C++ שימו Introduction to ++ שימו תרגול זה אינו התרגול הרישמי של הקורס. הוא מבוסס על חוברת התרגולים אך מכיל שינויים, הסברים נוספים ודוגמאות שונות או נוספות. + + תוכנ ית רא שונה ב הכרו ת עם + + תרגול // First ++

More information

פתרון מוצע לבחינת מה"ט ב_שפת c מועד אביב תשע"ח, פברואר 8102 מחבר: מר שייקה בילו, מכללת אורט רחובות

פתרון מוצע לבחינת מהט ב_שפת c מועד אביב תשעח, פברואר 8102 מחבר: מר שייקה בילו, מכללת אורט רחובות פתרון מוצע לבחינת מה"ט ב_שפת c מועד אביב תשע"ח, פברואר 8102 מחבר: מר שייקה בילו, מכללת אורט רחובות שאלה מספר 1 התוכנית מגדירה חמישה משתנים שלמים: השלושה הראשונים הם שלושה מצביעים - *s *t,i. j ושלושה נוספים

More information

תוכנה 1 תרגול מספר 13

תוכנה 1 תרגול מספר 13 1 תוכנה 1 תרגול מספר 13 ו- HashCode Equals עוד על טיפוסים מוכללים )Advanced Generics( חריגים )Exceptions( בית הספר למדעי המחשב אוניברסיטת תל אביב 1 2 ו- HASHCODE EQUALS 3 תזכורת: המחלקה Object package

More information

תוכנה 1 תרגול מספר 13

תוכנה 1 תרגול מספר 13 1 2 תוכנה 1 תרגול מספר 13 ו- HashCode Equals עוד על טיפוסים מוכללים )Advanced Generics( ו- HASHCODE EQUALS חריגים )Exceptions( בית הספר למדעי המחשב אוניברסיטת תל אביב 1 3 4 package java.lang; תזכורת: המחלקה

More information

Makor. A System for Typesetting Biblical and Modern Hebrew. Version 2.0, January Alan Hoenig

Makor. A System for Typesetting Biblical and Modern Hebrew. Version 2.0, January Alan Hoenig ק מ Makor ר A System for Typesetting Biblical and Modern Hebrew with Omega and TEX Version.0, January 003 Alan Hoenig ahoenigsuffolk.lib.ny.us ק מ Makor: A System for Typesetting Biblical and Modern Hebrew

More information

במידה ולסעיף ניתנה תשובה ובנוסף נרשם לגבי הסעיף לא יודע/ת אזי הניקוד שיינתן

במידה ולסעיף ניתנה תשובה ובנוסף נרשם לגבי הסעיף לא יודע/ת אזי הניקוד שיינתן פקולטה: מדעי הטבע מחלקה: מדעי המחשב שם הקורס: מבוא למחשבים ושפת C קוד הקורס: 2-7028510 תאריך בחינה: שאלות חזרה למבחן. חשוב: אין להסיק ששאלות אחרות לא יכולות להישאל במבחן, אין להסיק כי נושאים מסויימים בסיליבוס

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

More information

Operating Systems. Practical Session 4 Threads

Operating Systems. Practical Session 4 Threads Operating Systems Practical Session 4 Threads 1 Threads Executed within a process. Allow multiple independent executions under the same process (container). Possible states: running, ready, blocked, terminated.

More information

[VARIABLE declaration] BEGIN. sequential statements

[VARIABLE declaration] BEGIN. sequential statements PROCESS statement (contains sequential statements) Simple signal assignment statement

More information

Problem Set 5 Solutions

Problem Set 5 Solutions Problem Set 5 Solutions library ieee; use ieee.std_logic_1164.all; use work.std_arith.all; -- here is the declaration of entity entity la_rewarder is port (clk, go, SRAM_busy, SRAM_rdy: in std_logic; min:

More information

תוכנה 1 * לא בהכרח בסדר הזה

תוכנה 1 * לא בהכרח בסדר הזה תוכנה 1 תרגול 7: מנשקים, פולימורפיזם ועוד * לא בהכרח בסדר הזה 2 מנשקים מנשקים מנשק )interface( הוא מבנה תחבירי ב- Java המאפשר לחסוך בקוד לקוח. מנשק מכיל כותרות של מתודות המימוש שלהן. )חתימות( ללא קוד אשר

More information

VHDL Examples Mohamed Zaky

VHDL Examples Mohamed Zaky VHDL Examples By Mohamed Zaky (mz_rasmy@yahoo.co.uk) 1 Half Adder The Half Adder simply adds 2 input bits, to produce a sum & carry output. Here we want to add A + B to produce Sum (S) and carry (C). A

More information

The Art of Sigils. Week 1: Desig!

The Art of Sigils. Week 1: Desig! The Art of Sigils Week 1: Desig! What are sigils? a sign or image considered magical; a seal or signet x Well, that s a nice broad definition. Sigils in History monograms, goetic seals, symbols of profession,

More information

EITF35: Introduction to Structured VLSI Design

EITF35: Introduction to Structured VLSI Design EITF35: Introduction to Structured VLSI Design Part 2.2.2: VHDL-3 Liang Liu liang.liu@eit.lth.se 1 Outline Inference of Basic Storage Element Some Design Examples DFF with enable Counter Coding Style:

More information

מבוא לתכנות בשפת C. Tzachi (Isaac) Rosen

מבוא לתכנות בשפת C. Tzachi (Isaac) Rosen מבוא לתכנות בשפת C מצביעים והקצאה דינאמית כתובות של משתנים לכל משתנה כתובת של המקום שלו בזיכרון כבר ראינו: שם של מערך הוא למעשה הכתובת של התא הראשון )באינדקס 0( של המערך להזכירכם: תא של מערך הינו משתנה

More information

קורס תכנות שיעור שני: שימוש במשתנים,

קורס תכנות שיעור שני: שימוש במשתנים, קורס תכנות שיעור שני: שימוש במשתנים, בקרת זרימה, לולאות 1 נושאי השיעור היום משתנים )variables( טיפוסי משתנים בשפת C הגדרת משתנים השמה למשתנים פעולות על משתנים קליטת ערכים מהמשתמש הדפסה משתנים בקרת זרימה

More information

Hebrew for. Instructions regarding unicode, keyboards and word processing for students of Hebrew.

Hebrew for. Instructions regarding unicode, keyboards and word processing for students of Hebrew. Hebrew for. Instructions regarding unicode, keyboards and word processing for students of Hebrew. Compiled by Michelle Knight Trinity Evangelical Divinity School Table of Contents Introduction 3 Versions

More information

Object-Oriented Analysis and Design

Object-Oriented Analysis and Design Object-Oriented Analysis and Design Session 2a: Structure Modeling Object-Oriented Analysis and Design 1 Outline 1. Objects and Classes 4 2. Basic Association Concepts.17 3. Class Diagrams and Object (instance)

More information

מבוא למדעי המחשב תירגול 3:

מבוא למדעי המחשב תירגול 3: מבוא למדעי המחשב תירגול 3: לולאות, קלט, וטיפוסים תוכנייה לולאת while קלט טיפוסי משתנים המרת טיפוסים טיפוס char מבוא למדעי המחשב מ' - תירגול 3 2 לולאת while מבוא למדעי המחשב מ' - תירגול 3 3 לולאת while

More information

מבוא למדעי המחשב תירגול 2: מבוא למדעי המחשב מ' - תירגול 2

מבוא למדעי המחשב תירגול 2: מבוא למדעי המחשב מ' - תירגול 2 מבוא למדעי המחשב תירגול 2: לולאות, קלט, וטיפוסים 1 תוכנייה לולאת while קלט טיפוסי משתנים המרת טיפוסים טיפוס char 2 לולאת while 3 לולאת while קטע קוד מתבצע שוב ושוב כל עוד תנאי מתקיים int number = 40; while(number>0)

More information

Chapter 11.2 Linked lists ( )

Chapter 11.2 Linked lists ( ) Lecture of Geiger & Itai s slide brochure www.cs.technion.ac.il/~dang/courseds מערכים, מטריצות דלילות, ורשימות מקושרות חומר קריאה לשיעור זה Chapter. Linked lists ( ) Geiger & Itai, מערך מוגדר ע"י הפעולות

More information

גיליון תשובות מספר נבחן:

גיליון תשובות מספר נבחן: גיליון תשובות מספר נבחן: 03( שאלה 1 סעיף א )02 (i) //@PRE: checkinv(other.getx(),other.gety(),other.getradius()) //@POST: getradius() other.getradius() >= // Math.max(Math.abs(getY()-other.getY()),Math.abs(getX()-

More information

רשימות דילוגים Skip Lists

רשימות דילוגים Skip Lists Lecture6 of Geiger & Itai s slide brochure www.cs.technion.ac.il/~dang/courseds רשימות דילוגים Skip Lists Skip lists: A probabilistic Alternative to Balanced Trees, William Pugh, Communications of the

More information

תרגילים ופתרונות בשפת - C הסתעפויות

תרגילים ופתרונות בשפת - C הסתעפויות תרגילים ופתרונות בשפת - C הסתעפויות כתב וערך: שייקה בילו תרגיל - 1 כתוב תוכנית שתקבל מהמשתמש שלושה מספרים, ותציג את הגדול מביניהם על המסך. #include void main() int mis1, mis2, mis3, max; printf("please

More information

תוכנה 1 תרגול מספר 10: תרגיל חזרה חברת הייטק בית הספר למדעי המחשב אוניברסיטת תל אביב

תוכנה 1 תרגול מספר 10: תרגיל חזרה חברת הייטק בית הספר למדעי המחשב אוניברסיטת תל אביב 1 תוכנה 1 תרגול מספר 10: תרגיל חזרה חברת הייטק בית הספר למדעי המחשב אוניברסיטת תל אביב 1 2 חברת הייטק בתרגיל זה נתרגל מספר נושאים אותם למדנו בשיעורים האחרונים: עיצוב ובניית מודל המורכב ממחלקות לתיאור סביבה

More information

שאלה 1 מהו הפלט של התוכנית הבאה:

שאלה 1 מהו הפלט של התוכנית הבאה: תרגול חזרה שאלה 1 מהו הפלט של התוכנית הבאה: public sttic int wht(int n) { int i; int sum=0; if(n == 0) return 1; for (i=0; i

More information

Inferring Storage Elements

Inferring Storage Elements Inferring Storage Elements In our designs, we usually use flip-flops as our storage elements. Sometimes we use latches, but not often. Latches are smaller in size, but create special, often difficult situations

More information

תזכורת: עץבינארי מבוא למדעי המחשב הרצאה 24: עצי חיפוש בינאריים

תזכורת: עץבינארי מבוא למדעי המחשב הרצאה 24: עצי חיפוש בינאריים מבוא למדעי המחשב הרצאה 2: עצי חיפוש בינאריים תזכורת: עץבינארי בנוסףלרשימהמקושרת ומערך, הצגנומבנהנתונים קונקרטיחדש עץבינארי עץבינארימורכבמ: שורש תת-עץשמאלי תת-עץימני A B C D E F G 2 תזכורת: שורש ותתי-עצים

More information

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14

COE 405, Term 062. Design & Modeling of Digital Systems. HW# 1 Solution. Due date: Wednesday, March. 14 COE 405, Term 062 Design & Modeling of Digital Systems HW# 1 Solution Due date: Wednesday, March. 14 Q.1. Consider the 4-bit carry-look-ahead adder (CLA) block shown below: A 3 -A 0 B 3 -B 0 C 3 4-bit

More information

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a

Schedule. ECE U530 Digital Hardware Synthesis. Rest of Semester. Midterm Question 1a ECE U530 Digital Hardware Synthesis Prof. Miriam Leeser mel@coe.neu.edu November 8, 2006 Midterm Average: 70 Lecture 16: Midterm Solutions Homework 6: Calculator Handshaking HW 6: Due Wednesday, November

More information

Cisco WAAS & WAFS When Network and Storage meet. Ariel Touson, SA Bynet Data Communications ltd.

Cisco WAAS & WAFS When Network and Storage meet. Ariel Touson, SA Bynet Data Communications ltd. Cisco WAAS & WAFS When Network and Storage meet Ariel Touson, SA Bynet Data Communications ltd. תוכ ן: א תגרים בניהול סביבות מ חשוב מבוזרות When Network and Storage meet? תפיסתה של חברת Cisco בנוגע ל -

More information

תוכנה 1 תרגול 2: מערכים, מבני בקרה ושגיאות

תוכנה 1 תרגול 2: מערכים, מבני בקרה ושגיאות תוכנה 1 תרגול 2: מערכים, מבני בקרה ושגיאות מערכים Array: A fixed-length data structure for storing multiple values of the same type Example: An array of odd numbers: Indices (start from 0) 0 1 2 3 4 5

More information

SEQUENTIAL STATEMENTS

SEQUENTIAL STATEMENTS SEQUENTIAL STATEMENTS Sequential Statements Allow to describe the behavior of a circuit as a sequence of related events Can be used to model, simulate and synthesize: Combinational logic circuits Sequential

More information

VHDL in 1h. Martin Schöberl

VHDL in 1h. Martin Schöberl VHDL in 1h Martin Schöberl VHDL /= C, Java, Think in hardware All constructs run concurrent Different from software programming Forget the simulation explanation VHDL is complex We use only a small subset

More information

אוניברסיטת בן-גוריון בהצלחה! מספר נבחן: מדור בחינות רשמו תשובותיכם בשאלון זה בלבד ובמקום המוקצה לכך בלבד! תשובות מחוץ לשאלון לא יבדקו.

אוניברסיטת בן-גוריון בהצלחה! מספר נבחן: מדור בחינות רשמו תשובותיכם בשאלון זה בלבד ובמקום המוקצה לכך בלבד! תשובות מחוץ לשאלון לא יבדקו. אוניברסיטת בןגוריון מדור בחינות מספר נבחן: רשמו תשובותיכם בשאלון זה בלבד ובמקום המוקצה לכך בלבד! תשובות מחוץ לשאלון לא יבדקו. תאריך הבחינה: 13.7.2008 שם המורה: ד"ר מיכאל אלחדד ניר צחר אוריאל ברגיג שם הקורס:

More information

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles

ECE 448 Lecture 4. Sequential-Circuit Building Blocks. Mixing Description Styles ECE 448 Lecture 4 Sequential-Circuit Building Blocks Mixing Description Styles George Mason University Reading Required P. Chu, FPGA Prototyping by VHDL Examples Chapter 4, Regular Sequential Circuit Recommended

More information

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6

DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 DIGITAL LOGIC WITH VHDL (Fall 2013) Unit 6 FINITE STATE MACHINES (FSMs) Moore Machines Mealy Machines FINITE STATE MACHINES (FSMs) Classification: Moore Machine: Outputs depend only on the current state

More information

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID:

COVER SHEET: Total: Regrade Info: 5 (14 points) 7 (15 points) Midterm 1 Spring 2012 VERSION 1 UFID: EEL 4712 Midterm 1 Spring 2012 VERSION 1 Name: UFID: IMPORTANT: Please be neat and write (or draw) carefully. If we cannot read it with a reasonable effort, it is assumed wrong. As always, the best answer

More information

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution

The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 2005 Homework #6 Solution 5.3(a)(2), 5.6(c)(2), 5.2(2), 8.2(2), 8.8(2) The University of Alabama in Huntsville Electrical and Computer Engineering CPE/EE 422/522 Spring 25 Homework #6 Solution 5.3 (a) For the following SM chart:

More information

Example 58: Traffic Lights

Example 58: Traffic Lights 208 Chapter 8 Listing 8.7(cont.) doorlock2_top.vhd btn012

More information

מבוא לתכנות ב- JAVA תרגול 7

מבוא לתכנות ב- JAVA תרגול 7 מבוא לתכנות ב- JAVA תרגול 7 רקורסיה - הקדמה הגדרה רקורסיבית: חדר הוא מסודר אם צד שמאל שלו מסודר שלו מסודר. וצד ימין שיטת פתרון רקורסיבית: פתרון מופעים פשוטים יותר של בעיה בכדי לפתור את הבעיה המקורית רקורסיה

More information

Biblical Hebrew (Tiro) keyboard manual

Biblical Hebrew (Tiro) keyboard manual א ר Biblical Hebrew (Tiro) keyboard manual John Hudson, 2004, 200. For keyboard driver version 1.2 See page for upgrade instructions Introduction This manual and keyboard charts are designed to help you

More information

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents

VHDL Testbench. Test Bench Syntax. VHDL Testbench Tutorial 1. Contents VHDL Testbench Tutorial 1 Contents 1 VHDL Testbench 2 Test Bench Syntax 3 Testbench Example: VHDL Code for Up Down Binary Counter 4 VHDL Testbench code for up down binary counter 5 Testbench Waveform for

More information

מבוא למדעי המחשב תרגול 8 רשימה משורשרת כללית, Comparator

מבוא למדעי המחשב תרגול 8 רשימה משורשרת כללית, Comparator מבוא למדעי המחשב 2017 תרגול 8 רשימה משורשרת כללית, Comparator בתרגול היום. LinkedList בניית ההכללה מ- LinkIntList תרגול המבנה ושימושיו ממשקים: Comparator Sorted Linked List ל- LinkedList ע"י שימוש ב- Comparator

More information

Mridula Allani Fall Fall

Mridula Allani Fall Fall Mridula Allani Fall 2010 Fall 2010 1 Model and document digital systems Hierarchical models System, RTL (Register Transfer Level), gates Different levels of abstraction Behavior, structure Verify circuit/system

More information

P07303 Series Customer Display User Manual

P07303 Series Customer Display User Manual P07303 Series Customer Display User Manual 2007 August V1.7 Copyright 2007 August All Rights Reserved Manual Version 1.7 The information contained in this document is subject to change without notice.

More information

Advanced Lab in Computer Communications Meeting 1 Layers Model, Codes, Ethernet. Instructor: Tom Mahler

Advanced Lab in Computer Communications Meeting 1 Layers Model, Codes, Ethernet. Instructor: Tom Mahler Advanced Lab in Computer Communications Meeting 1 Layers Model, Codes, Ethernet Instructor: Tom Mahler Course Objective הודעות כלליות מעבר על דף מידע OSI Model Classical 7 layers model IP model Application

More information

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab

Department of Electronics & Communication Engineering Lab Manual E-CAD Lab Department of Electronics & Communication Engineering Lab Manual E-CAD Lab Prasad V. Potluri Siddhartha Institute of Technology (Sponsored by: Siddhartha Academy of General & Technical Education) Affiliated

More information

גירסה

גירסה גירסה 1.00 29.02.2004 לולאות בשפת C מסמך זה הורד מהאתר.http://underwar.livedns.co.il אין להפיץ מסמך זה במדיה כלשהי, ללא אישור מפורש מאת המחבר. מחבר המסמך איננו אחראי לכל נזק, ישיר או עקיף, שיגרם עקב השימוש

More information

Computer-Aided Digital System Design VHDL

Computer-Aided Digital System Design VHDL بس م اهلل الر حم ن الر حی م Iran University of Science and Technology Department of Computer Engineering Computer-Aided Digital System Design VHDL Ramin Rajaei ramin_rajaei@ee.sharif.edu Modeling Styles

More information

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006

The University of Alabama in Huntsville ECE Department CPE Midterm Exam Solution March 2, 2006 The University of Alabama in Huntsville ECE Department CPE 526 01 Midterm Exam Solution March 2, 2006 1. (15 points) A barrel shifter is a shift register in which the data can be shifted either by one

More information

LaserJet Enterprise M506

LaserJet Enterprise M506 LaserJet Enterprise M506 M506n M506dn Installation Guide www.hp.com/support/ljm506 1 Select a sturdy, well-ventilated, dust-free area, away from direct sunlight to position the printer. 2 M506n M506dn

More information

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle Network Security Chapter 2 Basics 2.1 Symmetric Cryptography Overview of Cryptographic Algorithms Attacking

More information

תוכנה 1 * לא בהכרח בסדר הזה

תוכנה 1 * לא בהכרח בסדר הזה תוכנה 1 תרגול 7: מנשקים, פולימורפיזם ועוד * לא בהכרח בסדר הזה 2 מנשקים מנשקים מנשק )interface( הוא מבנה תחבירי ב- Java המאפשר לחסוך בקוד לקוח. מנשק מכיל כותרות של מתודות המימוש שלהן. )חתימות( ללא קוד אשר

More information

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security

Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle. Network Security Chair for Network Architectures and Services Department of Informatics TU München Prof. Carle Network Security Chapter 2 Basics 2.1 Symmetric Cryptography Overview of Cryptographic Algorithms Attacking

More information

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions

CSE 260 Introduction to Digital Logic and Computer Design. Exam 1 Solutions CSE 6 Introduction to igital Logic and Computer esign Exam Solutions Jonathan Turner /3/4. ( points) raw a logic diagram that implements the expression (B+C)(C +)(B+ ) directly (do not simplify first),

More information

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas

Nanosistemų programavimo kalbos 5 paskaita. Sekvencinių schemų projektavimas Nanosistemų programavimo kalbos 5 paskaita Sekvencinių schemų projektavimas Terminai Combinational circuit kombinacinė schema (be atminties elementų) Sequential circuit nuosekli (trigerinė, sekvencinė)

More information